/**
 * @file GLInfo.h
 * @ingroup Utilities
 *
 * @brief GLInfo definitions header
 */

/**
 * @defgroup Utilities
 *
 *   Utility classes to be used in various places of the project.
 *
 */

/* --
 * Copyright (c) 2012, Christophe Huriaux
 * Distributed under the terms of the MIT license.
 * http://www.opensource.org/licenses/mit-license.php
 * --
 */

#include <string>

#ifndef GLINFO_H_
#define GLINFO_H_

/** @class GLInfo
 *  @ingroup Utilities
 *  @brief Set of helpers to access various OpenGL informations
 *
 *    @c GLInfo regroups static helpers to OpenGL data for debugging and
 * characterization of the current implementation in order to enable and/or
 * disable some tweaks.
 *
 * @warning All of the @c GLInfo members should only be called in the thread
 * which owns the OpenGL context (the one who runs the @c GLWindow), or the
 * calls @b will fail.
 *
 * @see GLInfo
 */
class GLInfo
{
private:
    /**
     * @brief GLInfo constructor
     *
     *    The constructor is private, there is no need to instanciate GLInfo
     * in order to retrieve OpenGL informations.
     */
	GLInfo() {};

	/** @name OpenGL interface
	 * @{
	 */
	static std::string getString(unsigned int name);
	static int getInteger(unsigned int name);
	static float getFloat(unsigned int name);
	//!@}

public:
	/** @name API implementation
	 * @{
	 */
	static std::string vendor();
	static std::string renderer();
	static std::string version();
	static std::string shslVersion();
	static std::string extensions();
	//!@}

	/** @name Hardware capabilities
	 * @{
	 */
	static int maxVertexAttribs();
	static int maxTextureUnits();
	//!@}
};
#endif /* GLINFO_H_ */
